<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="h-full font-sans antialiased">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=1280">
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('app.name', 'Laravel') }}</title>


    <!-- Styles -->
    <link href="{{ asset('css/dashboard.css') }}" rel="stylesheet">

    <script src="{{asset('/lib/aliyun-upload-sdk/lib/es6-promise.min.js')}}"></script>
    <script src="{{asset('/lib/aliyun-upload-sdk/lib/aliyun-oss-sdk-5.3.1.min.js')}}"></script>
    <script src="{{asset('/lib/aliyun-upload-sdk/aliyun-upload-sdk-1.5.0.min.js')}}"></script>
    <link rel="stylesheet" href="//g.alicdn.com/de/prismplayer/2.6.0/skins/default/aliplayer-min.css" />
    <script type="text/javascript" src="//g.alicdn.com/de/prismplayer/2.6.0/aliplayer-min.js"></script>
</head>
<body>
<div id="app">

    <el-container class="tree-container">
        <el-aside class="tree-aside" width="300px">
            <div style="height: 60px;line-height: 60px;text-align: center">
                {{ config('app.name', 'Laravel') }}
            </div>
            <tree-nav-menu></tree-nav-menu>
        </el-aside>

        <el-container>
            <el-header class="tree-header">
                <el-dropdown>
                    <i class="el-icon-setting" style="margin-right: 15px"></i>
                    <el-dropdown-menu slot="dropdown">
                        {{--            <el-dropdown-item>修改密码</el-dropdown-item>--}}
                        <el-dropdown-item><a class="dropdown-item" href="{{ route('logout') }}"
                                             onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                {{ __('Logout') }}
                            </a>

                            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                @csrf
                            </form>
                        </el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
                <span><el-tag size="small">{{ auth()->user()->role_title }}</el-tag> {{ auth()->user()->name }}</span>
            </el-header>

            <el-main>
                @yield('content')
            </el-main>
        </el-container>
    </el-container>


</div>
<script>
    window.config = {
        baseUrl: '{{ url('dashboard') }}',
        isAdmin: {{intval(auth()->user()->is_admin)}}
    };
</script>

<!-- Scripts -->
<script src="{{ asset('js/dashboard.js') }}"></script>


</body>
</html>
